<template>
    <div class="global_order marginTop10">
        <div class="main_white padding10 paddingTop0">
            <div class="main_ti">

                <el-form :model="yingshi_form" :inline="false" class="demo-form-inline" ref="drug_check_form_1"
                    label-width="100px" :rules="rules">
                    <el-form-item class="flex_center" prop="name">
                        <span slot="label"> 设备序列号:</span>
                        <el-input v-model="yingshi_form.yingshi_key" placeholder="设备底部序列号"></el-input>
                    </el-form-item>
                    <el-form-item class="flex_center" prop="secret">
                        <span slot="label"> 设备验证码:</span>
                        <el-input v-model="yingshi_form.yingshi_secret" placeholder="设备底部验证码"></el-input>
                    </el-form-item>
                </el-form>
                <div class="clearfix"></div>
                <div class="newConBox_p100 paddingBottom10" id="newConBox">
                    <div class="newConBox_h32">
                        <div>
                            <el-button type="primary" @click="preservation" v-repeatClick>保存</el-button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
  
<script>
import rules from "@/rules/global/globalyingshiSet.js";
export default {
    props: {
        form: {
            type: Object,
            required: true,
        },
    },
    data() {
        return {
            rules,
            yingshi_form: {},
            url: "",
            radio: 0,
        };
    },
    watch: {
        form: {
            handler(newval, oldval) {
                this.radio = newval.drug_residue_automatic;
            },
            deep: true,
            immediate: true,
        },
    },

    mounted() {

        this.yingshi_form = this.form;
        console.log(this.yingshi_form);
        // this.setting_school();
    },
    methods: {
        preservation() {
            this.$emit("save", { data: this.yingshi_form });
            console.log(123);
        },

        passwordChange(val) {
            console.log(val);
        },

    },
};
</script>
  
<style lang="scss" scoped>
@import "@/styles/variables.scss";

/deep/.el-input {
    width: 400px;
}

.radio_box {
    padding-left: 80px;
    padding-bottom: 18px;
}
</style>